import React from "react";
import {LdhFieldSet} from "@biz/PageCompnents";
import {LdhFormItem, LdhInput, LdhInputNumber, LdhMapSelect, LdhObjListSelect} from "@biz/Components";
import BaseDetailPage from "@biz/BaseDetailPage";
import {createAction} from "../Action";
import Config from "../config";
import Store from "../Store";

const prefix = "wash-product-detail";
export default class WashProductDetail extends BaseDetailPage {

    constructor(props) {
        super(props);
        this.action = createAction();
        this.config = Config(this.action);
        this.store = new Store(props, this.config, this.action);
        this.className = prefix;
    }



    renderDetail(isDetail) {
        let {loading} = this.state;
        return <LdhFieldSet title="基本信息" btn={!isDetail} loading={loading}>


            <LdhFormItem label="起付金额" name="startPrice" required isDetail={isDetail}  rules={[{pattern:window.CONFIG.REG_NUM_D2, message:"金额保留两位小数"}]}>
                <LdhInput placeholder="订单起付金额" />
            </LdhFormItem>

            <LdhFormItem label="起始时间(分钟)" name="startMinute" required isDetail={isDetail}  rules={[{pattern:window.CONFIG.REG_NUM_INT, message:"起始时间为整数"}]}>
                <LdhInput placeholder="起付金额对应的可用时长，超过该时间按分钟计费" />
            </LdhFormItem>

            <LdhFormItem label="每分钟单价" name="minutePrice" required isDetail={isDetail}  rules={[{pattern:window.CONFIG.REG_NUM_D2, message:"金额保留两位小数"}]}>
                <LdhInput placeholder="超过起始时间后每分钟收费金额" />
            </LdhFormItem>


            


        </LdhFieldSet>

    }
}